package com.hgw.Demo11_VisitorPattern.examples;

/**
 * Data time:2021/12/21 20:42
 * StudentID:2019112118
 * Author:hgw
 * Description: 客户端测试类
 */
public class Client {
    public static void main(String[] args) {
        EmployeeList employees = new EmployeeList();
        Employee fte1,fte2,fte3,pte1,pte2;

        fte1 = new FulltimeEmployee("张无忌",3200.00,45);
        fte2 = new FulltimeEmployee("杨过",2000.00,40);
        fte3 = new FulltimeEmployee("段誉",2400.00,38);
        pte1 = new ParttimeEmployee("洪七公",80.00,20);
        pte2 = new ParttimeEmployee("郭靖",60.00,18);

        employees.addEmployee(fte1);
        employees.addEmployee(fte2);
        employees.addEmployee(fte3);
        employees.addEmployee(pte1);
        employees.addEmployee(pte2);

        Department fad,hrd;
        fad = new FADepartment();
        employees.accept(fad);
        System.out.println("=============================");
        hrd = new HRDepartment();
        employees.accept(hrd);
    }
}
